const session = window.sessionStorage;

const setSData = (key, value) => {
  session.setItem(key, JSON.stringify(value));
};

const getSData = (key) => {
  return JSON.parse(session.getItem(key));
};

const removeSData = (key) => {
  session.removeItem(key);
};

const clearSData = () => {
  session.clear();
};

export { setSData, getSData, removeSData, clearSData };
